<template>
  <div class="message">
    <div class="user cleaxfix">
      <div class="username f_left">
          <h5 v-if="isShow">波吉</h5>
          <h5 v-if="!isShow" @click="loginFn">登入</h5>
        <span>获得0喜欢，已加入0天</span>
      </div>   

      <div class="usericon f_right" v-if="isShow">
        <img src="../assets/img/boji.jpg" alt="">
      </div>
       <div class="usericon f_right" v-if="!isShow">
        <img src="../assets/img/login.png" alt="">
      </div>

    </div>

    <div class="push_card">
        <button @click="jumpPc">阅读打开</button>
    </div>
  </div>
</template>

<script>
export default {
  data(){
     return{
       isShow : '',
        msg : this.$route.params.msg,
     }
  },
  methods:{
   jumpPc(){
      this.$router.push("/article");
   },
   loginFn(){
     this.$router.push("/jump");
   }
  },
  mounted(){
    this.isShow = sessionStorage.getItem('show');
  }
};
</script>

<style lang="scss" scoped>
@import "../assets/css/reset.css";
@import "../assets/common/variable.scss";

.message {
  height: 120px;
  .user{
    height: 70px;
    .username{
        font-size: 16px;
        padding-left: 30px;
        padding-top: 10px;
         line-height:30px ;
        h5{
          font-size: 22px;
        }
        span{
            color: $color;
        }
    }
    .usericon{
        width: 70px;
        height: 70px;
        border-radius: 50%;
        margin-right: 42px;
        margin-top: 10px;
        border:1px solid #fff;
        > img{
            width: 100%;
            height: 100%;
            display: block;
            border-radius: 50%;
        }
    }
  }
  .push_card{
      button{
          background: #ffa631;
          color: #fff;
          border: none;
          padding: 8px 10px;
          font-size: 12px;
          border-radius: 20px;
          margin-left: 20px;
      }
  }
}
</style>